Skip to content

feat(backend): add goals module with CRUD, progress tracking, and com… - #1134

Merged
Akanimoh12 merged 1 commit into
Akanimoh12:test-implement-dripsfrom
ExcelDsigN-tech:feat/goals-crud-progress-completion-docs
Jul 27, 2026
Merged

feat(backend): add goals module with CRUD, progress tracking, and com…#1134
Akanimoh12 merged 1 commit into
Akanimoh12:test-implement-dripsfrom
ExcelDsigN-tech:feat/goals-crud-progress-completion-docs

Conversation

@ExcelDsigN-tech

Copy link
Copy Markdown

Closes #1021, Closes #1022, Closes #1023, Closes #1025

Overview

This PR implements the complete goals feature set within the real-time off-chain backend for Stellar Tipz (backend/src/modules/goals/). Target PR base branch: test-implement-drips.

The changes add secure CRUD operations for creator goals, automatic real-time progress calculations based on incoming tips, automatic goal completion detection with notification triggers, and comprehensive OpenAPI/Swagger documentation for all goals endpoints.

Feature Summary

  • Goals CRUD Module: Implemented REST endpoints for creating, reading, updating, and soft-deleting/archiving creator goals with authentication and authorization checks.
  • Dynamic Goal Progress Calculation: Developed real-time progress aggregation logic that calculates current vs. target amounts based on confirmed tips and contribution transactions.
  • Completion Detection & Notifications: Added event-driven monitors to automatically detect when a goal threshold is met/exceeded and fire completion notification events to the notification service.
  • API Documentation: Added OpenAPI/Swagger annotations and schemas covering all goal routes, payloads, parameters, and response structures.

Technical Implementation

  • backend/src/modules/goals/goals.controller.ts: Defined routes for goals CRUD, progress lookups, and manual adjustments, protected by JWT authentication and owner authorization guards.
  • backend/src/modules/goals/goals.service.ts: Implemented business logic for goal lifecycle management, tip calculation aggregations, percentage completion computations, and idempotent state transitions upon goal completion.
  • backend/src/modules/goals/goals.listener.ts / Event Bus: Subscribed to incoming tip events to automatically update goal progress, check completion thresholds, and dispatch goal completion notification triggers.
  • backend/src/modules/goals/dto/: Created validated request DTOs (create-goal.dto.ts, update-goal.dto.ts) with class-validator decorators and OpenAPI properties.

Test Coverage

  • Unit Tests: Verified goal state management, calculation accuracy across edge cases (0% progress, overflow past 100%, multi-currency handling), and guard authorizations.
  • Integration Tests: Tested end-to-end HTTP endpoints for CRUD routes, event-driven progress updates upon tip insertion, and completion notification dispatches.
  • Quality Checks: Verified npm run typecheck, npm run lint, and npm run test all execute successfully with zero errors or warnings.

Checklists

  • Implemented secure, authorized CRUD endpoints for goals
  • Integrated automated progress calculation logic tied to tip events
  • Added automated goal completion detection and notification dispatching
  • Documented all endpoints and schemas via Swagger/OpenAPI annotations
  • Verified full test suite, TypeScript typecheck, and linter pass cleanly

…pletion detection

Implements creator funding goals feature with:
- CRUD operations (create, read, update, delete)
- Real-time progress calculation (percentage, days remaining)
- Automatic completion detection and notification
- Ownership enforcement (users can only modify their own goals)
- OpenAPI documentation for Swagger UI
- 23 unit tests covering all functionality

Closes #issues-goals-crud, #issues-goal-progress, #issues-goal-completion
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@ExcelDsigN-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Akanimoh12
Akanimoh12 merged commit d76f496 into Akanimoh12:test-implement-drips Jul 27, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goals: Goals API docs Goals: Goal completion detection + notification Goals: Goal progress calculation Goals: CRUD endpoints for goals

2 participants